# CardData.gd（资源类脚本）
extends Resource
class_name CardData

enum Type { ENVIRONMENT, ENEMY, RESOURCE }

@export_category("Basic Settings")
@export var type: Type
@export var display_name: String
@export_multiline var description: String

@export_category("Gameplay Values")
@export var stamina_cost: float
@export var eco_value: int
@export var unlock_depth: int = 0

@export_category("Visual Assets")
@export var front_texture: Texture2D
@export var back_texture: Texture2D
#@export var particle_effect: GPUParticles2D
# 新增粒子效果参数（替代直接引用节点）
@export_category("Particle Settings")
@export var particle_color: Color = Color.WHITE
@export var particle_lifetime: float = 1.0
@export var particle_amount: int = 50

# 动态属性计算方法
func get_actual_cost(current_depth: int) -> float:
	return stamina_cost * (1.0 + current_depth * 0.15)
#func _exit_tree() -> void:
	#if particle_effect:
		#particle_effect.queue_free()
